import { SingleInstance } from './singleInstance'

// 日期控件指定时间
async function main() {
    const driver = SingleInstance.create_drive();

    await driver.get("https://www.ctrip.com/");

    let jsscript = `document.querySelector('input[id="HD_CheckIn"]').value = "2020-03-03"`
    // await driver.executeScript(jsscript)

    await driver.executeScript((val: string)=> {
        // 执行js方法
        let dom = document.querySelector('input[id="HD_CheckIn') as HTMLInputElement;
        dom.value = val;
    }, "2020-02-02")

}

main();